package com.song.shop.dynamic;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
/**
 *  双数据源
 *
 *  未完成
 *  
 * @author song
 *
 */
public class DynamicRoutingDataSource /*extends AbstractRoutingDataSource*/ {
	
	private final Logger logger = LoggerFactory.getLogger(DynamicRoutingDataSource.class);
	
	//@Override
	protected Object determineCurrentLookupKey() {
		logger.info("Current DataSource is [{}]", DynamicDataSourceHolder.getDataSource());
		//return null;
		return DynamicDataSourceHolder.getDataSource() ;
	}

}
